package com.sgg;

import com.sgg.service.IUserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author ：brid
 * @date ：Created in 2021/5/21 10:37
 * @description：(消费者启动类)
 * @modified By：
 * @version: $
 */
public class ConsumerMain {
    public static void main(String[] args) {
        //测试常规服务
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("consumer.xml");
        context.start();
        System.out.println("consumer start");
        IUserService userService = (IUserService)context.getBean("userService");
        System.out.println("consumer");
        System.out.println(userService.getNameById("1321445"));
    }
}
